﻿	      <?php include("conn.php");
             mysql_query('SET NAMES UTF8'); 

	  

class MyPrizeBean
{
	public $fulse;

	function __construct($fulse)
	{
		$this->fulse      = $fulse;
	}
}


$rert30=mysql_query("select *from goodsorders where  ordersid ='".$_REQUEST[ordersid]."'");
$rowf=mysql_fetch_array($rert30);

	$prize = array();
	if($rowf[state]=="4")
	{
	
	   if($rowf[tuikuan]=="1")
	    {
	      $tui=2;	$state=4;
	    }
		
	}
	else
	{
	$tui=0;
	$state=4;
	}
	
		$str = preg_replace('/[\x{10000}-\x{10FFFF}]/u', '', $_REQUEST['content']);//转义表情 （输入法表情输入时使用）
	$zhuan=addslashes($str);//转义
	
$srat=mysql_query("update goodsorders set state='".$state."' where ordersid='".$_REQUEST[ordersid]."'");

// 调用信息推送接口
$url = "http://120.24.0.10/xzpf/api/jpush/jpush.php?state=".$state."&ordersid=".$_REQUEST[ordersid];
file_get_contents($url);
// 调用信息推送接口 end
  
	  $srat1=mysql_query("update goodsorders set tuikuan='".$tui."' where ordersid='".$_REQUEST[ordersid]."'");
	  $srat1=mysql_query("update goodsorders set content='".$zhuan."' where ordersid='".$_REQUEST[ordersid]."'");
	

	      if($srat==true)
	     {
		  $der=100;
		  
		  }
		
		 else
		  {
		   $der=300;
		  }

$prize[] = new MyPrizeBean($der);
echo json_encode($prize);


?>